// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
import store from './vuex/index'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import VueClipboard from 'vue-clipboard2'

Vue.use(MintUI)
import '@s'

Vue.use(iView)
Vue.config.productionTip = false
Vue.use(VueClipboard)

/* eslint-disable no-new */
const vv = new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
})

// document.addEventListener(
// 	'deviceready',
// 	function() {
// 		new Vue({
// 			el: '#app',
// 			router,
// 			store,
// 			components: { App },
// 			template: '<App/>',
// 		})
// 		window.navigator.splashscreen.hide()
// 	},
// 	false,
// )

// 自定义获取焦点指令
Vue.directive('foces', {
  update: function(el, { value }) {
    var a = el.className.substring(el.className.length - 1)
    if (a == value) {
      el.focus()
    }
  },
})

export { vv }
